[None][chore] replace mktemp#15725
Conversation
📝 WalkthroughWalkthroughReplaces ChangesBuilder Test Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/unittest/others/test_builder.py`:
- Around line 60-61: The test around builder.save_config is reusing tmp.name
while the NamedTemporaryFile handle is still open, which can fail on Windows,
and delete=False leaves the temp file behind. Update the test in test_builder.py
to close the temporary file before calling builder.save_config and ensure the
file is removed afterward, ideally using a try/finally or teardown cleanup
around the tempfile.NamedTemporaryFile usage.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: c8231579-77fc-475e-b8c7-bb463066a4cb
📒 Files selected for processing (1)
tests/unittest/others/test_builder.py
Signed-off-by: Tyler Burt <195370667+tburt-nv@users.noreply.github.com>
Signed-off-by: Tyler Burt <195370667+tburt-nv@users.noreply.github.com>
ca759bb to
e77db5e
Compare
|
/bot run --stage-list "A100X-TensorRT-Post-Merge-*" |
|
PR_Github #56403 [ run ] triggered by Bot. Commit: |
|
PR_Github #56403 [ run ] completed with state
|
|
/bot run --stage-list "A100X-TensorRT-Post-Merge-*" |
|
PR_Github #56423 [ run ] triggered by Bot. Commit: |
|
PR_Github #56423 [ run ] completed with state
|
Description
mktemp is deprecated, so this PR replaces it with TemporaryDirectory in the test code.
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.Summary by CodeRabbit